-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature: add hybrid search retriever using Qdrant in-memory vector store #1176
Open
asajatovic
wants to merge
6
commits into
Aleph-Alpha:main
Choose a base branch
from
asajatovic:feature/in-memory-hybrid-search
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
feature: add hybrid search retriever using Qdrant in-memory vector store #1176
asajatovic
wants to merge
6
commits into
Aleph-Alpha:main
from
asajatovic:feature/in-memory-hybrid-search
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
asajatovic
changed the title
feature: add hybrid search retriever using Qdrant in-memory vector st…
feature: add hybrid search retriever using Qdrant in-memory vector store
Dec 5, 2024
asajatovic
force-pushed
the
feature/in-memory-hybrid-search
branch
from
December 5, 2024 14:22
9953869
to
f0d8972
Compare
NiklasKoehneckeAA
requested changes
Dec 9, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reviewed this, it seems some test code is still missing. Currently IL pipelines are still not fixed after the cluster move, which is something we have are working on, so this is blocked until then.
src/intelligence_layer/connectors/retrievers/hybrid_qdrant_in_memory_retriever.py
Outdated
Show resolved
Hide resolved
src/intelligence_layer/connectors/retrievers/hybrid_qdrant_in_memory_retriever.py
Outdated
Show resolved
Hide resolved
src/intelligence_layer/connectors/retrievers/hybrid_qdrant_in_memory_retriever.py
Outdated
Show resolved
Hide resolved
src/intelligence_layer/connectors/retrievers/hybrid_qdrant_in_memory_retriever.py
Show resolved
Hide resolved
src/intelligence_layer/connectors/retrievers/hybrid_qdrant_in_memory_retriever.py
Show resolved
Hide resolved
src/intelligence_layer/connectors/retrievers/hybrid_qdrant_in_memory_retriever.py
Show resolved
Hide resolved
src/intelligence_layer/connectors/retrievers/hybrid_qdrant_in_memory_retriever.py
Outdated
Show resolved
Hide resolved
src/intelligence_layer/connectors/retrievers/hybrid_qdrant_in_memory_retriever.py
Outdated
Show resolved
Hide resolved
src/intelligence_layer/connectors/retrievers/hybrid_qdrant_in_memory_retriever.py
Outdated
Show resolved
Hide resolved
tests/connectors/retrievers/test_hybrid_qdrant_in_memory_retriever.py
Outdated
Show resolved
Hide resolved
asajatovic
force-pushed
the
feature/in-memory-hybrid-search
branch
from
December 9, 2024 10:37
f0d8972
to
2d6d24d
Compare
NiklasKoehneckeAA
requested changes
Dec 10, 2024
src/intelligence_layer/connectors/retrievers/hybrid_qdrant_in_memory_retriever.py
Outdated
Show resolved
Hide resolved
src/intelligence_layer/connectors/retrievers/hybrid_qdrant_in_memory_retriever.py
Show resolved
Hide resolved
tests/connectors/retrievers/test_hybrid_qdrant_in_memory_retriever.py
Outdated
Show resolved
Hide resolved
src/intelligence_layer/connectors/retrievers/hybrid_qdrant_in_memory_retriever.py
Outdated
Show resolved
Hide resolved
NiklasKoehneckeAA
approved these changes
Dec 18, 2024
NiklasKoehneckeAA
requested changes
Dec 18, 2024
src/intelligence_layer/connectors/retrievers/hybrid_qdrant_in_memory_retriever.py
Outdated
Show resolved
Hide resolved
tests/connectors/retrievers/test_hybrid_qdrant_in_memory_retriever.py
Outdated
Show resolved
Hide resolved
tests/connectors/retrievers/test_hybrid_qdrant_in_memory_retriever.py
Outdated
Show resolved
Hide resolved
src/intelligence_layer/connectors/retrievers/hybrid_qdrant_in_memory_retriever.py
Show resolved
Hide resolved
…ore and Reciprocal Rank Fusion
…uctor Set default value of `max_workers` in `HybridQdrantInMemoryRetriever` in `__init__`. In addition, use `min(len(documents), self._max_workers)` as number of concurrent calls to embedding service. Finally, updates constructor docs to use Google style default values.
asajatovic
force-pushed
the
feature/in-memory-hybrid-search
branch
from
December 18, 2024 14:55
e6b6f8c
to
b91e180
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Adds a new hybrid search retriever that combines dense and sparse embedding models to score documents and return the most relevant results. It uses Qdrant's in-memory vector store and supports filtering, with results fused using the Reciprocal Rank Fusion algorithm.
Implementation wise, the new class
HybridQdrantInMemoryRetriever
inheritsQdrantInMemoryRetriever
and acts as a drop in replacement, with the addition of also doing sparse vector search, using the reference BM25 algorithm. By using this hybrid approach, we can improve search relevance.Before Merging
changelog.md
if necessary